package gwtgaetools.client.ui.slider;

import com.google.gwt.core.client.GWT;
import com.google.gwt.resources.client.ClientBundle;
import com.google.gwt.resources.client.DataResource;
import com.google.gwt.resources.client.ImageResource;
import com.google.gwt.user.client.ui.Image;
import com.kiouri.sliderbar.client.view.SliderBarHorizontal;

public class MySlider extends SliderBarHorizontal {

	Images images = GWT.create(Images.class);
	
	public MySlider(int maxValue, String width) {
	    setLessWidget(new Image(images.less()));
		setScaleWidget(new Image(images.scale().getSafeUri()), 16);
		setMoreWidget(new Image(images.more()));
		setDragWidget(new Image(images.drag()));
		this.setWidth(width);
		this.setMaxValue(maxValue);
	}
	
	interface Images extends ClientBundle {
		
		@Source("kdedrag.png")
		ImageResource drag();

		@Source("kdehleft.png")
		ImageResource less();

		@Source("kdehright.png")
		ImageResource more();

		@Source("scale.png")
		DataResource scale();
	}	


}
